package top.javai.www.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import top.javai.www.pojo.TestTable;
import top.javai.www.service.TestTableService;

@Controller
@RequestMapping("/message")
public class TestTableController {
    @Autowired
    private TestTableService testTableService;

    @RequestMapping("/personMessage")
    @ResponseBody
    public TestTable selectMessage(Integer id){
        System.out.println(id);
        TestTable testTable = testTableService.selectTestTableMessage(id);
        return testTable;
    }
    @RequestMapping("/insertMessage")
    @ResponseBody
    public int insertTestTableMessage(Integer roleId,String name){
        int i = testTableService.insertTestTableMessage(roleId, name);
        return i;
    }
}
